﻿using shop.Bll.Logi;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using unvell.ReoGrid;
using CommonTools;

namespace shop.Logi
{
    public partial class SyncLogForm : Form
    {
        public string Flag { set; get; }

        private SyncLogBll _bll = new SyncLogBll();


        public SyncLogForm()
        {
            InitializeComponent();

            this.box_end.Value = DateTime.Today;
            this.box_begin.Value = DateTime.Today.AddMonths(-1);
        }

        private async void btn_Query_Click(object sender, EventArgs e)
        {
            var res = await _bll.QueryLog(this.box_begin.Value.Value, this.box_end.Value.Value, this.Flag);

            new GridDataBuilder(this.grid1)
                .UseData(res)
                //.AutoCreateColumns()
                .End();


        }


         
    }
}
